Closed
Bug 1141867
Opened 10 years ago
Closed 10 years ago
Layout of contiguous floats and vertical writing-modes
Categories
(Core :: Layout: Floats, defect)
Core
Layout: Floats
Tracking
()
RESOLVED
FIXED
mozilla40
Tracking | Status | |
---|---|---|
firefox40 | --- | fixed |
People
(Reporter: bugzilla, Assigned: jfkthame)
References
(Blocks 1 open bug)
Details
(Keywords: testcase)
Attachments
(4 files, 1 obsolete file)
1.04 KB,
text/html
|
Details | |
2.44 KB,
patch
|
smontagu
:
review+
|
Details | Diff | Splinter Review |
5.57 KB,
patch
|
smontagu
:
review+
|
Details | Diff | Splinter Review |
7.91 KB,
patch
|
smontagu
:
review+
|
Details | Diff | Splinter Review |
Tests (with vendor-prefixes)
----------------------------
A)
http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/s71-float-contiguous-vrl-002.xht
http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/s71-float-contiguous-vrl-004.xht
B)
http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/s71-float-contiguous-vrl-012.xht
http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/s71-float-contiguous-vrl-013.xht
Expected results
----------------
A)
http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/s43-inline-replaced-vrl-004-ref.xht
and
B)
http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/s71-float-contiguous-vrl-012-ref.xht
Explanation
-----------
The main, primary goal of those tests was to verify this sentence-rule for laying out horizontally contiguous floats:
"
If the current box is left-floating, and there are any left-floating boxes generated by elements earlier in the source document, then for each such earlier box, either the left outer edge of the current box must be to the right of the right outer edge of the earlier box, or its top must be lower than the bottom of the earlier box. Analogous rules hold for right-floating boxes.
"
CSS2.1, §9.5.1 Positioning the float: the 'float' property
http://www.w3.org/TR/CSS21/visuren.html#float-position
Notes
-----
- http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/s71-float-contiguous-vrl-012.xht
seems like a duplicate test of
http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/wm-line-box-direction-006a.xht
- Those tests (along with 8 other float-contiguous tests) have been submitted to the test.csswg.org repository
http://lists.w3.org/Archives/Public/public-css-testsuite/2015Mar/0001.html
but have not yet been reviewed
- IE11, Chrome 40.0.2272.76 pass these 4 tests. Prince 9.0.5 seems to pass the 3 vertical-rl tests.
- I am using Firefox 39.0a1 buildID=20150306184824
- I use Linux 3.16.0-30-generic x86_64, Qt: 4.8.6, KDE 4.14.1; Kubuntu (utopic) 14.10
- I've searched for duplicates and did not find any.
Reporter | ||
Updated•10 years ago
|
Blocks: writing-mode
Keywords: testcase
Reporter | ||
Comment 1•10 years ago
|
||
Comment 2•10 years ago
|
||
The "A" tests pass in a build with the patches from bug 1145218.
Depends on: 1145218
Assignee | ||
Comment 3•10 years ago
|
||
Assignee | ||
Comment 4•10 years ago
|
||
This is a slightly simplified version of Gérard's tests, using an explicitly-specified size for the floats.
It seems there are (at least) two issues to be addressed here. The positioning of the floats is wrong because FloatMarginISize() (helper in nsBlockReflowState) needs to return the inline-size in the containing block reflow state's writing mode, which is NOT necessarily the float's mode.
Fixing this (patch coming) will fix the rendering of this testcase; however, by itself it doesn't fix Gérard's original. There, we also have an issue with computing the used (auto) block-size of the floats; I'm still looking into that.
Assignee | ||
Comment 5•10 years ago
|
||
Here's the patch that fixes attachment 8590092 [details] (but not the (B) tests from comment 0).
Attachment #8590095 -
Flags: review?(smontagu)
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Assignee | ||
Comment 6•10 years ago
|
||
The second problem arises when the (orthogonal) float's block-size is unconstrained; this means FloatMarginISize can't return a useful result based on ComputeSize(). Instead, we'll need to actually reflow the float block to find its desired size. With this patch, all the testcases in this bug now pass successfully.
Attachment #8590129 -
Flags: review?(smontagu)
Assignee | ||
Comment 7•10 years ago
|
||
And here are some reftests. I'm expecting a certain amount of fuzz will be needed, as these tests compare Ahem glyphs to solid background blocks, which means we'll get antialiasing discrepancies at the edges; once tryserver reopens, I'll see how it looks.
Attachment #8590148 -
Flags: review?(smontagu)
Assignee | ||
Comment 8•10 years ago
|
||
Assignee | ||
Comment 9•10 years ago
|
||
Now with fuzz annotations as suggested by tryserver.
Attachment #8590257 -
Flags: review?(smontagu)
Assignee | ||
Updated•10 years ago
|
Attachment #8590148 -
Attachment is obsolete: true
Attachment #8590148 -
Flags: review?(smontagu)
Updated•10 years ago
|
Attachment #8590095 -
Flags: review?(smontagu) → review+
Updated•10 years ago
|
Attachment #8590129 -
Flags: review?(smontagu) → review+
Assignee | ||
Updated•10 years ago
|
Blocks: enable-writing-mode-release
Updated•10 years ago
|
Attachment #8590257 -
Flags: review?(smontagu) → review+
Assignee | ||
Comment 10•10 years ago
|
||
Backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/b959fe3a4bd1 for reftest orange:
https://treeherder.mozilla.org/logviewer.html#?job_id=9085427&repo=mozilla-inbound
Flags: needinfo?(bugzilla)
Assignee | ||
Comment 12•10 years ago
|
||
Assignee | ||
Comment 13•10 years ago
|
||
Assignee | ||
Comment 14•10 years ago
|
||
Cancelling n-i on gtalbot; the problem here is with the adapted version of his testcases that I landed. I'll fix.
Flags: needinfo?(bugzilla)
Reporter | ||
Comment 15•10 years ago
|
||
In tests
http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/s71-float-contiguous-vrl-012.xht
http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/s71-float-contiguous-vlr-013.xht
, I use Ahem font and have only 5 characters per each floating <div>s.
In layout/reftests/floats/orthogonal-floats-1a.html and orthogonal-floats-1b tests, Ahem font is not used and
1.45 - <div class="floated-right">fghijk</div>
1.46 -
1.47 - <div class="floated-right">lmnopq</div>
those 2 <div>s have 6 characters.
orthogonal-floats-1c and orthogonal-floats-1d appear correct: they use Ahem font and the <div> have 5 characters.
I hope this helps you.
Gérard
Assignee | ||
Comment 16•10 years ago
|
||
Assignee | ||
Comment 17•10 years ago
|
||
Comment on attachment 8590257 [details] [diff] [review]
patch 3 - Reftests for contiguous orthogonal floats
Review of attachment 8590257 [details] [diff] [review]:
-----------------------------------------------------------------
::: layout/reftests/floats/orthogonal-floats-1c.html
@@ +3,5 @@
> + <head>
> + <title>Bug 1141867 - Contiguous right-floating boxes with vertical writing mode</title>
> + <!-- based on testcases from Gérard Talbot, see https://bugzilla.mozilla.org/show_bug.cgi?id=1141867 -->
> + <style type="text/css">
> + <meta charset="utf-8">
Oops - the problem here was that when I added a <meta charset...> tag to the test files, I accidentally put it *after* the opening <style> tag in this case, which causes the entire @font-face declaration to be dropped. And so test 1c failed everywhere.
Assignee | ||
Comment 18•10 years ago
|
||
Assignee | ||
Comment 19•10 years ago
|
||
Comment 20•10 years ago
|
||
Comment 21•10 years ago
|
||
Add OSX 10.10 fuzz.
https://hg.mozilla.org/integration/mozilla-inbound/rev/e96da1601299
https://hg.mozilla.org/mozilla-central/rev/7a6e34768d64
https://hg.mozilla.org/mozilla-central/rev/aee0f6fa554b
https://hg.mozilla.org/mozilla-central/rev/ed00b1808284
https://hg.mozilla.org/mozilla-central/rev/fcbc5a4f5bb1
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox40:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in
before you can comment on or make changes to this bug.
Description
•